package com.csweimei.rentmanagementtreasure.http.entity;

import android.view.View;

import com.csweimei.rentmanagementtreasure.utils.ValidateUtils;
import com.google.gson.annotations.SerializedName;

import java.util.List;

public class TabOneScheduleBean extends BaseResult{

    @SerializedName("data")
    private List<DataDTO> data;

    public List<DataDTO> getData() {
        return data;
    }

    public void setData(List<DataDTO> data) {
        this.data = data;
    }

    public static class DataDTO {
        @SerializedName("date")
        private String date;
        @SerializedName("myList")
        private List<MyListDTO> myList;

        public String getDate() {
            return date;
        }

        public void setDate(String date) {
            this.date = date;
        }

        public List<MyListDTO> getMyList() {
            return myList;
        }

        public void setMyList(List<MyListDTO> myList) {
            this.myList = myList;
        }

        public static class MyListDTO {
            @SerializedName("id")
            private int id;
            @SerializedName("scheduleType")
            private String scheduleType;
            @SerializedName("scheduleTime")
            private String scheduleTime;
            @SerializedName("housingID")
            private int housingID;
            @SerializedName("category")
            private String category;
            @SerializedName("quarters")
            private String quarters;
            @SerializedName("Address")
            private String address;
            @SerializedName("sid")
            private String sid;
            @SerializedName("customName")
            private String customName;
            @SerializedName("customPhone")
            private String customPhone;
            @SerializedName("title")
            private String title;
            @SerializedName("Text")
            private String text;
            @SerializedName("longitude")
            private String longitude;
            @SerializedName("latitude")
            private String latitude;


            public String getName() {
                switch (scheduleType) {
                    case "跟进房源":
                        return quarters;
                    case "跟进客户":
                        return customName;
                    default:
                        return title;
                }
            }


            public String getContent() {
                switch (scheduleType) {
                    case "跟进房源":
                        return "地址："+address;
                    case "跟进客户":
                        return "电话："+customPhone;
                    default:
                        return "";
                }
            }

            public int show() {
                switch (scheduleType) {
                    case "跟进客户":
                        return View.VISIBLE;
                    default:
                        return View.GONE;
                }
            }


            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public String getScheduleType() {
                return scheduleType;
            }

            public void setScheduleType(String scheduleType) {
                this.scheduleType = scheduleType;
            }

            public String getScheduleTime() {
                return ValidateUtils.getTimeByType(scheduleTime,ValidateUtils.TIME_HM);
            }

            public void setScheduleTime(String scheduleTime) {
                this.scheduleTime = scheduleTime;
            }

            public int getHousingID() {
                return housingID;
            }

            public void setHousingID(int housingID) {
                this.housingID = housingID;
            }

            public String getCategory() {
                return category;
            }

            public void setCategory(String category) {
                this.category = category;
            }

            public String getQuarters() {
                return quarters;
            }

            public void setQuarters(String quarters) {
                this.quarters = quarters;
            }

            public String getAddress() {
                return address;
            }

            public void setAddress(String address) {
                this.address = address;
            }

            public String getSid() {
                return sid;
            }

            public void setSid(String sid) {
                this.sid = sid;
            }

            public String getCustomName() {
                return customName;
            }

            public void setCustomName(String customName) {
                this.customName = customName;
            }

            public String getCustomPhone() {
                return customPhone;
            }

            public void setCustomPhone(String customPhone) {
                this.customPhone = customPhone;
            }

            public String getTitle() {
                return title;
            }

            public void setTitle(String title) {
                this.title = title;
            }

            public String getText() {
                return text;
            }

            public void setText(String text) {
                this.text = text;
            }

            public String getLongitude() {
                return longitude;
            }

            public void setLongitude(String longitude) {
                this.longitude = longitude;
            }

            public String getLatitude() {
                return latitude;
            }

            public void setLatitude(String latitude) {
                this.latitude = latitude;
            }
        }
    }
}
